package com.dkd.easybook.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dkd.easybook.domain.EbAttachmentRelations;
import com.dkd.easybook.mapper.EbAttachmentRelationsMapper;
import com.dkd.easybook.service.IEbAttachmentRelationsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 附件关系Service业务层处理
 * 
 * @author itheima
 * @date 2024-12-30
 */
@Service
public class EbAttachmentRelationsServiceImpl extends ServiceImpl<EbAttachmentRelationsMapper, EbAttachmentRelations> implements IEbAttachmentRelationsService
{
    @Autowired
    private EbAttachmentRelationsMapper ebAttachmentRelationsMapper;

    /**
     * 查询附件关系
     * 
     * @param id 附件关系主键
     * @return 附件关系
     */
    @Override
    public EbAttachmentRelations selectEbAttachmentRelationsById(Long id)
    {
        return ebAttachmentRelationsMapper.selectEbAttachmentRelationsById(id);
    }

    /**
     * 查询附件关系列表
     * 
     * @param ebAttachmentRelations 附件关系
     * @return 附件关系
     */
    @Override
    public List<EbAttachmentRelations> selectEbAttachmentRelationsList(EbAttachmentRelations ebAttachmentRelations)
    {
        return ebAttachmentRelationsMapper.selectEbAttachmentRelationsList(ebAttachmentRelations);
    }

    /**
     * 新增附件关系
     * 
     * @param ebAttachmentRelations 附件关系
     * @return 结果
     */
    @Override
    public int insertEbAttachmentRelations(EbAttachmentRelations ebAttachmentRelations)
    {
        return ebAttachmentRelationsMapper.insertEbAttachmentRelations(ebAttachmentRelations);
    }

    /**
     * 修改附件关系
     * 
     * @param ebAttachmentRelations 附件关系
     * @return 结果
     */
    @Override
    public int updateEbAttachmentRelations(EbAttachmentRelations ebAttachmentRelations)
    {
        return ebAttachmentRelationsMapper.updateEbAttachmentRelations(ebAttachmentRelations);
    }

    /**
     * 批量删除附件关系
     * 
     * @param ids 需要删除的附件关系主键
     * @return 结果
     */
    @Override
    public int deleteEbAttachmentRelationsByIds(Long[] ids)
    {
        return ebAttachmentRelationsMapper.deleteEbAttachmentRelationsByIds(ids);
    }

    /**
     * 删除附件关系信息
     * 
     * @param id 附件关系主键
     * @return 结果
     */
    @Override
    public int deleteEbAttachmentRelationsById(Long id)
    {
        return ebAttachmentRelationsMapper.deleteEbAttachmentRelationsById(id);
    }
}
